package com.d0310test;

import java.util.Scanner;

public class Example {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int number=sc.nextInt();
        int number2=0;
        for(int i=1;i<number;i++){
            number2=number%10;
            System.out.print(number2);
            number=number/10;
        }
    }
}